<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GdkDeviceManager: GDK 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
<link rel="up" href="rn02.html" title="Deprecated">
<link rel="prev" href="gdk3-Colors.html" title="Colors">
<link rel="next" href="api-index-full.html" title="Index of all symbols">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GdkDeviceManager.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GdkDeviceManager.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GdkDeviceManager.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GdkDeviceManager.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rn02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk3-Colors.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GdkDeviceManager"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GdkDeviceManager.top_of_page"></a>GdkDeviceManager</span></h2>
<p>GdkDeviceManager — Functions for handling input devices</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GdkDeviceManager.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GdkDeviceManager.html#gdk-disable-multidevice" title="gdk_disable_multidevice ()">gdk_disable_multidevice</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDeviceManager.html#gdk-device-manager-get-display" title="gdk_device_manager_get_display ()">gdk_device_manager_get_display</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="GdkDeviceManager.html#gdk-device-manager-list-devices" title="gdk_device_manager_list_devices ()">gdk_device_manager_list_devices</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkDevice.html" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *
</td>
<td class="function_name">
<a class="link" href="GdkDeviceManager.html#gdk-device-manager-get-client-pointer" title="gdk_device_manager_get_client_pointer ()">gdk_device_manager_get_client_pointer</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type">
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</td>
<td class="property_name"><a class="link" href="GdkDeviceManager.html#GdkDeviceManager--display" title="The “display” property">display</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GdkDeviceManager.html#GdkDeviceManager-device-added" title="The “device-added” signal">device-added</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GdkDeviceManager.html#GdkDeviceManager-device-changed" title="The “device-changed” signal">device-changed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GdkDeviceManager.html#GdkDeviceManager-device-removed" title="The “device-removed” signal">device-removed</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GdkDeviceManager.html#GdkDeviceManager-struct" title="GdkDeviceManager">GdkDeviceManager</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GdkDeviceManager
</pre>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.description"></a><h2>Description</h2>
<p>In addition to a single pointer and keyboard for user interface input,
GDK contains support for a variety of input devices, including graphics
tablets, touchscreens and multiple pointers/keyboards interacting
simultaneously with the user interface. Such input devices often have
additional features, such as sub-pixel positioning information and
additional device-dependent information.</p>
<p>In order to query the device hierarchy and be aware of changes in the
device hierarchy (such as virtual devices being created or removed, or
physical devices being plugged or unplugged), GDK provides
<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a>.</p>
<p>By default, and if the platform supports it, GDK is aware of multiple
keyboard/pointer pairs and multitouch devices. This behavior can be
changed by calling <a class="link" href="GdkDeviceManager.html#gdk-disable-multidevice" title="gdk_disable_multidevice ()"><code class="function">gdk_disable_multidevice()</code></a> before <a class="link" href="GdkDisplay.html#gdk-display-open" title="gdk_display_open ()"><code class="function">gdk_display_open()</code></a>.
There should rarely be a need to do that though, since GDK defaults
to a compatibility mode in which it will emit just one enter/leave
event pair for all devices on a window. To enable per-device
enter/leave events and other multi-pointer interaction features,
<a class="link" href="gdk3-Windows.html#gdk-window-set-support-multidevice" title="gdk_window_set_support_multidevice ()"><code class="function">gdk_window_set_support_multidevice()</code></a> must be called on
<a href="gdk3-Windows.html#GdkWindow-struct"><span class="type">GdkWindows</span></a> (or <code class="function">gtk_widget_set_support_multidevice()</code> on widgets).
window. See the <a class="link" href="gdk3-Windows.html#gdk-window-set-support-multidevice" title="gdk_window_set_support_multidevice ()"><code class="function">gdk_window_set_support_multidevice()</code></a> documentation
for more information.</p>
<p>On X11, multi-device support is implemented through XInput 2.
Unless <a class="link" href="GdkDeviceManager.html#gdk-disable-multidevice" title="gdk_disable_multidevice ()"><code class="function">gdk_disable_multidevice()</code></a> is called, the XInput 2
<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> implementation will be used as the input source.
Otherwise either the core or XInput 1 implementations will be used.</p>
<p>For simple applications that don’t have any special interest in
input devices, the so-called “client pointer”
provides a reasonable approximation to a simple setup with a single
pointer and keyboard. The device that has been set as the client
pointer can be accessed via <a class="link" href="GdkDeviceManager.html#gdk-device-manager-get-client-pointer" title="gdk_device_manager_get_client_pointer ()"><code class="function">gdk_device_manager_get_client_pointer()</code></a>.</p>
<p>Conceptually, in multidevice mode there are 2 device types. Virtual
devices (or master devices) are represented by the pointer cursors
and keyboard foci that are seen on the screen. Physical devices (or
slave devices) represent the hardware that is controlling the virtual
devices, and thus have no visible cursor on the screen.</p>
<p>Virtual devices are always paired, so there is a keyboard device for every
pointer device. Associations between devices may be inspected through
<a class="link" href="GdkDevice.html#gdk-device-get-associated-device" title="gdk_device_get_associated_device ()"><code class="function">gdk_device_get_associated_device()</code></a>.</p>
<p>There may be several virtual devices, and several physical devices could
be controlling each of these virtual devices. Physical devices may also
be “floating”, which means they are not attached to any virtual device.</p>
<div class="refsect2">
<a name="id-1.3.3.9.10"></a><h3>Master and slave devices</h3>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">carlos</span><span class="err">@</span><span class="nl">sacarino</span><span class="p">:</span><span class="o">~</span><span class="n">$</span> <span class="n">xinput</span> <span class="n">list</span>
<span class="err">⎡</span> <span class="n">Virtual</span> <span class="n">core</span> <span class="n">pointer</span>                          <span class="n">id</span><span class="o">=</span><span class="mi">2</span>    <span class="p">[</span><span class="n">master</span> <span class="n">pointer</span>  <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">Virtual</span> <span class="n">core</span> <span class="n">XTEST</span> <span class="n">pointer</span>                <span class="n">id</span><span class="o">=</span><span class="mi">4</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">Wacom</span> <span class="n">ISDv4</span> <span class="n">E6</span> <span class="n">Pen</span> <span class="n">stylus</span>                 <span class="n">id</span><span class="o">=</span><span class="mi">10</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">Wacom</span> <span class="n">ISDv4</span> <span class="n">E6</span> <span class="n">Finger</span> <span class="n">touch</span>               <span class="n">id</span><span class="o">=</span><span class="mi">11</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">SynPS</span><span class="o">/</span><span class="mi">2</span> <span class="n">Synaptics</span> <span class="n">TouchPad</span>                <span class="n">id</span><span class="o">=</span><span class="mi">13</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">TPPS</span><span class="o">/</span><span class="mi">2</span> <span class="n">IBM</span> <span class="n">TrackPoint</span>                     <span class="n">id</span><span class="o">=</span><span class="mi">14</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎜</span>   <span class="err">↳</span> <span class="n">Wacom</span> <span class="n">ISDv4</span> <span class="n">E6</span> <span class="n">Pen</span> <span class="n">eraser</span>                 <span class="n">id</span><span class="o">=</span><span class="mi">16</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">pointer</span>  <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
<span class="err">⎣</span> <span class="n">Virtual</span> <span class="n">core</span> <span class="n">keyboard</span>                         <span class="n">id</span><span class="o">=</span><span class="mi">3</span>    <span class="p">[</span><span class="n">master</span> <span class="n">keyboard</span> <span class="p">(</span><span class="mi">2</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">Virtual</span> <span class="n">core</span> <span class="n">XTEST</span> <span class="n">keyboard</span>               <span class="n">id</span><span class="o">=</span><span class="mi">5</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">Power</span> <span class="n">Button</span>                              <span class="n">id</span><span class="o">=</span><span class="mi">6</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">Video</span> <span class="n">Bus</span>                                 <span class="n">id</span><span class="o">=</span><span class="mi">7</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">Sleep</span> <span class="n">Button</span>                              <span class="n">id</span><span class="o">=</span><span class="mi">8</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">Integrated</span> <span class="n">Camera</span>                         <span class="n">id</span><span class="o">=</span><span class="mi">9</span>    <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">AT</span> <span class="n">Translated</span> <span class="n">Set</span> <span class="mi">2</span> <span class="n">keyboard</span>              <span class="n">id</span><span class="o">=</span><span class="mi">12</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span>
    <span class="err">↳</span> <span class="n">ThinkPad</span> <span class="n">Extra</span> <span class="n">Buttons</span>                    <span class="n">id</span><span class="o">=</span><span class="mi">15</span>   <span class="p">[</span><span class="n">slave</span>  <span class="n">keyboard</span> <span class="p">(</span><span class="mi">3</span><span class="p">)]</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>By default, GDK will automatically listen for events coming from all
master devices, setting the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> for all events coming from input
devices. Events containing device information are <a class="link" href="gdk3-Events.html#GDK-MOTION-NOTIFY:CAPS"><span class="type">GDK_MOTION_NOTIFY</span></a>,
<a class="link" href="gdk3-Events.html#GDK-BUTTON-PRESS:CAPS"><span class="type">GDK_BUTTON_PRESS</span></a>, <a class="link" href="gdk3-Events.html#GDK-2BUTTON-PRESS:CAPS"><span class="type">GDK_2BUTTON_PRESS</span></a>, <a class="link" href="gdk3-Events.html#GDK-3BUTTON-PRESS:CAPS"><span class="type">GDK_3BUTTON_PRESS</span></a>,
<a class="link" href="gdk3-Events.html#GDK-BUTTON-RELEASE:CAPS"><span class="type">GDK_BUTTON_RELEASE</span></a>, <a class="link" href="gdk3-Events.html#GDK-SCROLL:CAPS"><span class="type">GDK_SCROLL</span></a>, <a class="link" href="gdk3-Events.html#GDK-KEY-PRESS:CAPS"><span class="type">GDK_KEY_PRESS</span></a>, <a class="link" href="gdk3-Events.html#GDK-KEY-RELEASE:CAPS"><span class="type">GDK_KEY_RELEASE</span></a>,
<a class="link" href="gdk3-Events.html#GDK-ENTER-NOTIFY:CAPS"><span class="type">GDK_ENTER_NOTIFY</span></a>, <a class="link" href="gdk3-Events.html#GDK-LEAVE-NOTIFY:CAPS"><span class="type">GDK_LEAVE_NOTIFY</span></a>, <a class="link" href="gdk3-Events.html#GDK-FOCUS-CHANGE:CAPS"><span class="type">GDK_FOCUS_CHANGE</span></a>,
<a class="link" href="gdk3-Events.html#GDK-PROXIMITY-IN:CAPS"><span class="type">GDK_PROXIMITY_IN</span></a>, <a class="link" href="gdk3-Events.html#GDK-PROXIMITY-OUT:CAPS"><span class="type">GDK_PROXIMITY_OUT</span></a>, <a class="link" href="gdk3-Events.html#GDK-DRAG-ENTER:CAPS"><span class="type">GDK_DRAG_ENTER</span></a>, <a class="link" href="gdk3-Events.html#GDK-DRAG-LEAVE:CAPS"><span class="type">GDK_DRAG_LEAVE</span></a>,
<a class="link" href="gdk3-Events.html#GDK-DRAG-MOTION:CAPS"><span class="type">GDK_DRAG_MOTION</span></a>, <a class="link" href="gdk3-Events.html#GDK-DRAG-STATUS:CAPS"><span class="type">GDK_DRAG_STATUS</span></a>, <a class="link" href="gdk3-Events.html#GDK-DROP-START:CAPS"><span class="type">GDK_DROP_START</span></a>, <a class="link" href="gdk3-Events.html#GDK-DROP-FINISHED:CAPS"><span class="type">GDK_DROP_FINISHED</span></a>
and <a class="link" href="gdk3-Events.html#GDK-GRAB-BROKEN:CAPS"><span class="type">GDK_GRAB_BROKEN</span></a>. When dealing with an event on a master device,
it is possible to get the source (slave) device that the event originated
from via <a class="link" href="gdk3-Events.html#gdk-event-get-source-device" title="gdk_event_get_source_device ()"><code class="function">gdk_event_get_source_device()</code></a>.</p>
<p>On a standard session, all physical devices are connected by default to
the "Virtual Core Pointer/Keyboard" master devices, hence routing all events
through these. This behavior is only modified by device grabs, where the
slave device is temporarily detached for as long as the grab is held, and
more permanently by user modifications to the device hierarchy.</p>
<p>On certain application specific setups, it may make sense
to detach a physical device from its master pointer, and mapping it to
an specific window. This can be achieved by the combination of
<a class="link" href="GdkDevice.html#gdk-device-grab" title="gdk_device_grab ()"><code class="function">gdk_device_grab()</code></a> and <a class="link" href="GdkDevice.html#gdk-device-set-mode" title="gdk_device_set_mode ()"><code class="function">gdk_device_set_mode()</code></a>.</p>
<p>In order to listen for events coming from devices
other than a virtual device, <a class="link" href="gdk3-Windows.html#gdk-window-set-device-events" title="gdk_window_set_device_events ()"><code class="function">gdk_window_set_device_events()</code></a> must be
called. Generally, this function can be used to modify the event mask
for any given device.</p>
<p>Input devices may also provide additional information besides X/Y.
For example, graphics tablets may also provide pressure and X/Y tilt
information. This information is device-dependent, and may be
queried through <a class="link" href="GdkDevice.html#gdk-device-get-axis" title="gdk_device_get_axis ()"><code class="function">gdk_device_get_axis()</code></a>. In multidevice mode, virtual
devices will change axes in order to always represent the physical
device that is routing events through it. Whenever the physical device
changes, the <a class="link" href="GdkDevice.html#GdkDevice--n-axes" title="The “n-axes” property"><span class="type">“n-axes”</span></a> property will be notified, and
<a class="link" href="GdkDevice.html#gdk-device-list-axes" title="gdk_device_list_axes ()"><code class="function">gdk_device_list_axes()</code></a> will return the new device axes.</p>
<p>Devices may also have associated “keys” or
macro buttons. Such keys can be globally set to map into normal X
keyboard events. The mapping is set using <a class="link" href="GdkDevice.html#gdk-device-set-key" title="gdk_device_set_key ()"><code class="function">gdk_device_set_key()</code></a>.</p>
<p>In GTK+ 3.20, a new <a class="link" href="GdkSeat.html" title="GdkSeat"><span class="type">GdkSeat</span></a> object has been introduced that
supersedes <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> and should be preferred in newly
written code.</p>
</div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-disable-multidevice"></a><h3>gdk_disable_multidevice ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_disable_multidevice (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Disables multidevice support in GDK. This call must happen prior
to <a class="link" href="GdkDisplay.html#gdk-display-open" title="gdk_display_open ()"><code class="function">gdk_display_open()</code></a>, <code class="function">gtk_init()</code>, <code class="function">gtk_init_with_args()</code> or
<code class="function">gtk_init_check()</code> in order to take effect.</p>
<p>Most common GTK+ applications won’t ever need to call this. Only
applications that do mixed GDK/Xlib calls could want to disable
multidevice support if such Xlib code deals with input devices in
any way and doesn’t observe the presence of XInput 2.</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-manager-get-display"></a><h3>gdk_device_manager_get_display ()</h3>
<pre class="programlisting"><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
gdk_device_manager_get_display (<em class="parameter"><code><a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager</code></em>);</pre>
<p>Gets the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> associated to <em class="parameter"><code>device_manager</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-manager-get-display.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-manager-get-display.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> to which
<em class="parameter"><code>device_manager</code></em>
is associated to, or <code class="literal">NULL</code>. This memory is
owned by GDK and must not be freed or unreferenced. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-manager-list-devices"></a><h3>gdk_device_manager_list_devices ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gdk_device_manager_list_devices (<em class="parameter"><code><a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager</code></em>,
                                 <em class="parameter"><code><a class="link" href="GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType"><span class="type">GdkDeviceType</span></a> type</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_device_manager_list_devices</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>, use <a class="link" href="GdkSeat.html#gdk-seat-get-pointer" title="gdk_seat_get_pointer ()"><code class="function">gdk_seat_get_pointer()</code></a>, <a class="link" href="GdkSeat.html#gdk-seat-get-keyboard" title="gdk_seat_get_keyboard ()"><code class="function">gdk_seat_get_keyboard()</code></a>
            and <a class="link" href="GdkSeat.html#gdk-seat-get-slaves" title="gdk_seat_get_slaves ()"><code class="function">gdk_seat_get_slaves()</code></a> instead.</p>
</div>
<p>Returns the list of devices of type <em class="parameter"><code>type</code></em>
 currently attached to
<em class="parameter"><code>device_manager</code></em>
.</p>
<div class="refsect3">
<a name="gdk-device-manager-list-devices.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>device type to get.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-manager-list-devices.returns"></a><h4>Returns</h4>
<p>a list of
<span class="type">GdkDevices</span>. The returned list must be
freed with <code class="function">g_list_free()</code>. The list elements are owned by
GTK+ and must not be freed or unreffed. </p>
<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gdk.Device]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-device-manager-get-client-pointer"></a><h3>gdk_device_manager_get_client_pointer ()</h3>
<pre class="programlisting"><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="returnvalue">GdkDevice</span></a> *
gdk_device_manager_get_client_pointer (<em class="parameter"><code><a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_device_manager_get_client_pointer</code> has been deprecated since version 3.20 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="GdkSeat.html#gdk-seat-get-pointer" title="gdk_seat_get_pointer ()"><code class="function">gdk_seat_get_pointer()</code></a> instead.</p>
</div>
<p>Returns the client pointer, that is, the master pointer that acts as the core pointer
for this application. In X11, window managers may change this depending on the interaction
pattern under the presence of several pointers.</p>
<p>You should use this function seldomly, only in code that isn’t triggered by a <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a>
and there aren’t other means to get a meaningful <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> to operate on.</p>
<div class="refsect3">
<a name="gdk-device-manager-get-client-pointer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>a <a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-device-manager-get-client-pointer.returns"></a><h4>Returns</h4>
<p>The client pointer. This memory is
owned by GDK and must not be freed or unreferenced. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkDeviceManager-struct"></a><h3>GdkDeviceManager</h3>
<pre class="programlisting">typedef struct _GdkDeviceManager GdkDeviceManager;</pre>
</div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GdkDeviceManager--display"></a><h3>The <code class="literal">“display”</code> property</h3>
<pre class="programlisting">  “display”                  <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</pre>
<p>Display for the device manager.</p>
<p>Owner: GdkDeviceManager</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GdkDeviceManager-device-added"></a><h3>The <code class="literal">“device-added”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager,
               <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>        *device,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::device-added signal is emitted either when a new master
pointer is created, or when a slave (Hardware) input device
is plugged in.</p>
<div class="refsect3">
<a name="GdkDeviceManager-device-added.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the newly added <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDeviceManager-device-changed"></a><h3>The <code class="literal">“device-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager,
               <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>        *device,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::device-changed signal is emitted whenever a device
has changed in the hierarchy, either slave devices being
disconnected from their master device or connected to
another one, or master devices being added or removed
a slave device.</p>
<p>If a slave device is detached from all master devices
(<a class="link" href="GdkDevice.html#gdk-device-get-associated-device" title="gdk_device_get_associated_device ()"><code class="function">gdk_device_get_associated_device()</code></a> returns <code class="literal">NULL</code>), its
<a class="link" href="GdkDevice.html#GdkDeviceType" title="enum GdkDeviceType"><span class="type">GdkDeviceType</span></a> will change to <a class="link" href="GdkDevice.html#GDK-DEVICE-TYPE-FLOATING:CAPS"><code class="literal">GDK_DEVICE_TYPE_FLOATING</code></a>,
if it's attached, it will change to <a class="link" href="GdkDevice.html#GDK-DEVICE-TYPE-SLAVE:CAPS"><code class="literal">GDK_DEVICE_TYPE_SLAVE</code></a>.</p>
<div class="refsect3">
<a name="GdkDeviceManager-device-changed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a> that changed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkDeviceManager-device-removed"></a><h3>The <code class="literal">“device-removed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GdkDeviceManager.html" title="GdkDeviceManager"><span class="type">GdkDeviceManager</span></a> *device_manager,
               <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>        *device,
               <span class="type">gpointer</span>          user_data)</pre>
<p>The ::device-removed signal is emitted either when a master
pointer is removed, or when a slave (Hardware) input device
is unplugged.</p>
<div class="refsect3">
<a name="GdkDeviceManager-device-removed.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device_manager</p></td>
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>the just removed <a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</div>
</div>
<div class="refsect1">
<a name="GdkDeviceManager.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GdkDevice.html" title="GdkDevice"><span class="type">GdkDevice</span></a>, <a class="link" href="gdk3-Event-Structures.html#GdkEvent" title="union GdkEvent"><span class="type">GdkEvent</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>